package com.yeyks.common.em.withdrawalorder;

/**
 * @Author fuchangshuai
 * @date 2019/9/3 9:57 AM
 */
public enum WithdrawalOrderOrderTypeEnum {
    C2B(0, "c2b营业额"),
    MATTRESS(1, "床垫分佣提现"),
    VIP(2, "vip分佣提现"),
    MINI_VIP(3, "小vip提现");

    int value;
    String desc;

    WithdrawalOrderOrderTypeEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer value() {
        return this.value;
    }

    public String desc() {
        return this.desc;
    }

    public static String getDesc(int value) {
        WithdrawalOrderOrderTypeEnum[] orderStatusEnums = values();
        for (WithdrawalOrderOrderTypeEnum orderStatusEnum : orderStatusEnums) {
            if (orderStatusEnum.value() == value) {
                return orderStatusEnum.desc();
            }
        }
        return null;
    }

    public static Integer getValue(String desc) {
        WithdrawalOrderOrderTypeEnum[] orderStatusEnums = values();
        for (WithdrawalOrderOrderTypeEnum orderStatusEnum : orderStatusEnums) {
            if (orderStatusEnum.desc().equals(desc)) {
                return orderStatusEnum.value();
            }
        }
        return null;
    }
}
